package academic.ui.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.gwtplatform.mvp.client.EventBus;

public class ProductResetEvent extends GwtEvent<ProductResetEventHandler>{

	
	private static final Type<ProductResetEventHandler> TYPE = new Type<ProductResetEventHandler>();
	private String id;
	public ProductResetEvent(String id) {
		this.setId(id);
	}

	public static Type<ProductResetEventHandler> getType() {
		return TYPE;
	}
	
	public static void fire(EventBus eventBus, String id) {
		eventBus.fireEvent(new ProductResetEvent(id));
	}
	
	@Override
	protected void dispatch(ProductResetEventHandler handler) {
		handler.onProductResetEvent(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ProductResetEventHandler> getAssociatedType() {
		return getType();
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

}
